package com.zxy.model;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;


@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
//第一种：加注解改名字@Document(collection="新改的名字")
//@Document(collection = "206_person")
public class Person {
    @Id
//    文档的id,类似于mysql的主键
    private Integer id;//没有id,会自动生成唯一id
    private String name;
    private Integer age;
    private Integer girls;
}
